package com.fc.mall.portal.config;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by Sunny on 2019/7/18.
 */
@Configuration
public class SmsConfig {
    @Value("${aliyun.sms.accessKeyId}")
    private String ACCESSKEYID;

    @Value("${aliyun.sms.accessKeySecret}")
    private String ACCESSKEYSECRET;

    @Bean
    public IAcsClient iAcsClient()
    {
        DefaultProfile profile = DefaultProfile.getProfile("default", ACCESSKEYID, ACCESSKEYSECRET);
        return new DefaultAcsClient(profile);
    }
}
